package com.tom.architect02.ui30.day22;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Toast;

import com.tom.architect02.R;

public class MainActivityUI22 extends AppCompatActivity {
    private ListDataScreenView mListDataScreenView;
    // 将选中的内容，回调给Activity。

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_ui22);

        mListDataScreenView = findViewById(R.id.list_data_screen_view);
        ListScreenMenuAdapter menuAdapter = new ListScreenMenuAdapter(this);
        mListDataScreenView.setAdapter(menuAdapter);
        menuAdapter.setOnSelectMenuListener(new ListScreenMenuAdapter.OnSelectMenuListener() {
            @Override
            public void onSelectMenuItem(int tabPosition, String text) {
                // 菜单中选择了item，回调到Activity。
                String msg = "select tab：" + tabPosition + " text:" + text;
                Toast.makeText(MainActivityUI22.this, msg, Toast.LENGTH_LONG).show();
            }
        });
    }

    public void click(View view) {
        Toast.makeText(this, "111", Toast.LENGTH_LONG).show();
    }
}